package com.micro.ai.template.dto.response;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

@Data
@Schema(description = "工作流响应")
public class WorkflowDTO {

    @Schema(description = "主键ID")
    private String id;

    @Schema(description = "工作流ID", example = "wf_123")
    private String workflowId;

    @Schema(description = "工作流名称", example = "客服工单处理流程")
    private String workflowName;

    @Schema(description = "描述")
    private String description;

    @Schema(description = "工作流定义")
    private Map<String, Object> definition;

    @Schema(description = "输入Schema")
    private Map<String, Object> inputSchema;

    @Schema(description = "输出Schema")
    private Map<String, Object> outputSchema;

    @Schema(description = "租户ID")
    private String tenantId;

    @Schema(description = "创建者用户ID")
    private String createdBy;

    @Schema(description = "创建者用户名")
    private String createdByUsername;

    @Schema(description = "是否启用")
    private Boolean enabled;

    @Schema(description = "版本号")
    private String version;

    @Schema(description = "标签列表")
    private List<String> tags;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "创建时间")
    private LocalDateTime createdAt;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "更新时间")
    private LocalDateTime updatedAt;
}

